#ifndef BROWSER_H
#define BROWSER_H

#include <QWidget>
#include <QMainWindow>
#include <QWebView>
#include <QtNetwork>
#include <QtWebKitWidgets>
#include <QLineEdit>

#include "Searchbox.h"

class Browser : public QMainWindow
{
    Q_OBJECT
public:
    Browser(QWidget *parent, const QUrl& url);

signals:

public slots:
    void adjustLocation();
    void changeLocation();
    void adjustTitle();
    void setProgress(int p);
    void finishLoading(bool);

    void ActionBackPage();
    void ActionForwardPage();
    void ActionReloadPage();
    void ActionStopPage();

//    void doSearch();

private:
    QString jQuery;
    QWebView *view;
    QLineEdit *locationEdit;
    int progress;

    QAction *act_back;
    QAction *act_forward;
    QAction *act_reload;
    QAction *act_stop;

    SearchBox *g_search;

//    GSuggestCompletion *finder;
};

#endif // BROWSER_H
